package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("未支付的订单页面数据")
public class NewSecondCollectionNotPayVO {

    @ApiModelProperty("藏品名字")
    private String firstTitle;

    @ApiModelProperty("缩略图")
    private String creationContent;

    @ApiModelProperty("售价")
    private String buyPrice;

    @ApiModelProperty("交易时间,这个时间是订单的交易时间,他获取的是最早的一条")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dealTime;


    @ApiModelProperty("过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expirationTime;

    @ApiModelProperty("订单集合")
    private List<NewSecondCollectionNotPayOrderVO> data;

    @ApiModelProperty("系统当前时间")
    private String nowDate;


    public void setBuyPrice(BigDecimal buyPrice) {
        this.buyPrice = buyPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

}
